home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
twi11.zip
/
TWI.DOC
< prev
next >
Wrap
Text File
|
1992-09-07
|
38KB
|
1,070 lines
Text Windowing Interface
Version 1.1
An Advanced Interface System For Turbo Pascal 6.0
By,
David Pabst
18 McAdams Road
Framingham, MA 01701
USA
Available through
CompuServe EMAIL
ID 76547,2643
-Or-
RelayNet Shareware Conference
copyright 1992
all rights reserved
Use of TWI is
only allowed for a
limited 31 day trial
period for unregistered
versions.
The Text Windowing Interface (TWI) is a Turbo Pascal 6.0
windowing toolkit that replaces Borland's Turbo Vision. TWI
easily incorporates text and windows together in an attractive
and consistent interface. TWI is great for new programs, and
even better for old programs that need a new look.
Ease Of Use
With TWI you can give your users a consistent, easy to use,
and great looking interface without much work. When users
start to see your great software, you'll start receiving
registrations.
Windowing
In the age of windowing you have to have a comprehensive
Windowing system to compete with another product. Even if
your program has more features than a competitor's product,
but his interface is better; You're going to lose out.
Quickly Incorporate TWI Into Your Programs
The Text Windowing Interface has many procedures that can
set the background up, set default colors, and much more.
These features are so easy to use, that even an amateur
Pascal programmer will be able to use them.
Pull Down Menus
The Text Windowing Interface has support for Pull Down
Menus. Pull down menus are now standard in almost every
program, and are now expected by the computer using public.
TWI is Colorful
TWI has been designed so that users can change the colors of
the interface, you can even hard code colors, or just call
the Default Color procedure and don't worry about having to
set the colors.
Support
When you register TWI, you get:
A) on-line support through Compuserve E-Mail,
B) support through RelayNet ShareWare (unofficial support
base) message base (Route To Xevious; To: David Pabst),
C) Text Windowing Interface Source Code,
D) A reduced upgrade price for all major upgrades (All
future versions will be totally registered for you by
using your registration code),
E) notification of all future releases, and
F) A disk with the latest version of TWI.
Table Of Contents
License For Shareware Version of TWI . . . . . . . . . . . Page 8
License For Registered Version of TWI. . . . . . . . . . Page 10
File Listing . . . . . . . . . . . . . . . . . . . . . . Page 11
Important Information. . . . . . . . . . . . . . . . . . Page 12
The Text Windowing Environment . . . . . . . . . . . . . Page 13
More Important Information . . . . . . . . . . . . . . . .Page 13
Colors . . . . . . . . . . . . . . . . . . . . . . . . . Page 13
Setting The Interface Up For The First Time. . . . . . . Page 13
Overall Interface\Background Procedures. . . . . . . . . Page 15
Procedure DRAWBACKGROUND. . . . . . . . . . . . . . Page 15
Procedure QUICKBKGDRAW. . . . . . . . . . . . . . . Page 16
Procedure CHANGESTATUSLINE. . . . . . . . . . . . . Page 17
Procedure CHANGEBOTTOMLINE. . . . . . . . . . . . . Page 17
Procedure TWICLOSE. . . . . . . . . . . . . . . . . Page 18
Windowing Procedures . . . . . . . . . . . . . . . . . . Page 19
Procedure DRAWONELINEWINDOW . . . . . . . . . . . . Page 19
Procedure TWIFILELOAD . . . . . . . . . . . . . . . Page 20
Procedure DRAWSMALLWINDOW . . . . . . . . . . . . . Page 21
Procedure CLEARSMALLWINDOW. . . . . . . . . . . . . Page 21
Procedure DRAWMEDIUMWINDOW. . . . . . . . . . . . . Page 22
Procedure CLEARMEDIUMWINDOW . . . . . . . . . . . . Page 22
Procedure DRAWLARGEWINDOW . . . . . . . . . . . . . Page 23
Procedure CLEARLARGEWINDOW. . . . . . . . . . . . . Page 23
Procedure DRAWVERYBIGWINDOW . . . . . . . . . . . . Page 24
Procedure CLEARVERYBIGWINDOW. . . . . . . . . . . . Page 24
Procedure DRAWCOLORBOX. . . . . . . . . . . . . . . Page 25
Procedure DRAWFULLWINDOWOUTLINE . . . . . . . . . . Page 25
Pull-Down Menuing Procedures . . . . . . . . . . . . . . Page 26
Procedure DRAWMENUS . . . . . . . . . . . . . . . . Page 26
Procedure MOVETOLOCAL . . . . . . . . . . . . . . . Page 26
Procecedure CLEANOLDLOCATION. . . . . . . . . . . . Page 27
Procedure DRAWSUBMENU . . . . . . . . . . . . . . . Page 27
Procedure WHERECURSORISREWRITE . . . . . . . . . . Page 28
Procedure OLDPLACEREWRITE . . . . . . . . . . . . . Page 28
Miscellaneous Commands . . . . . . . . . . . . . . . . . Page 29
Procedure WAITFORRETURN . . . . . . . . . . . . . . Page 29
Procedure DEFAULTCOLORS . . . . . . . . . . . . . . Page 29
Procedure WRITEXY . . . . . . . . . . . . . . . . . Page 30
Procedure WRITEXYI. . . . . . . . . . . . . . . . . Page 30
Further Help . . . . . . . . . . . . . . . . . . . . . . Page 31
Getting The Latest Version . . . . . . . . . . . . . . . Page 31
Order Form . . . . . . . . . . . . . . . . . . . . . . . Page 32License - Unregistered Shareware Copy
CAREFULLY READ THE FOLLOWING TERMS AND CONDITIONS. IF YOU DO NOT
AGREE WITH THEM, YOU SHOULD PROMPTLY DELETE THE ENTIRE TOOLKIT.
USING THIS SOFTWARE INDICATES YOUR ACCEPTANCE OF THE AGREEMENT.
The Text Windowing Interface is not Public Domain or free. It is
ShareWare. ShareWare is a way of distributing software so the
user can try the software before purchasing.
Non-Registered users of this software have 31 days to test TWI
before removing it from their system or registering. Using TWI
after the 31 days without registering is illegal.
TWI can not be modified in any respect, for any reason, including
but not limited to, de-compiling, disassembling, or reverse
engineering of TWI. The registration screen and all of the
menus, help files, and start up files must never be altered,
removed, bypassed, or disabled by any means (the bug-a-boo
registration screens are disabled with the registered copy).
You are free to distribute the publicly available shareware
version of TWI to others subject to the above restrictions and
also the following:
A) No fee is charged for its use.
B) No re-numeration may be accepted for TWI. This
does not apply to bulletin board service, online
services, etc... membership, subscription, or access
charges.
C) TWI must be distributed in un-altered form,
complete with licensing information, full documentation,
and all accompanying files and programs. The archive
must not be altered in any respect.
D) All Shareware vendors must make sure that the version is
the unregistered shareware version. You may request a
free evaluation disk. (Shareware houses ONLY)
Bulletin Board Systems (BBS) may make TWI available for download
only if the above conditions are met. The archive (TWI11.ZIP)
distributed by me or an equivalent archive may be made available
only in complete form. Refer to the File Listing for a complete
listing of all the files, use this to verify a complete packet.
If the contents appear to be altered or not complete, you may
obtain the latest shareware release of TWI for only $5.
Vendors must give a description that treats TWI fairly. It must
be an objective and non-biased review. Vendors may not refer to
this software as cheap, gaudy, et cetera. Included with TWI is
VENDORS.DOC which includes a few sample descriptions for TWI.License - Registered Copy
The previous license statement does not apply to the registered
version of TWI. The registered software is protected under
United States Copyright. It must be treated just like
commercial software with certain exceptions as follows:
A) I authorize the making of archival copies of the
registered version for the sole purpose of backing up
your software and protecting your investment from
possible loss.
B) The medium on which the registered software is recorded
is transferred to the customer, but not the title of the
software.
C) The software cannot be transferred to anyone. It can
be used only on one computer at a time. You can have it
on two or more computers, BUT IT CAN ONLY BE USED BY ONE
PERSON AT ONE TIME.
This license is effective until terminated. You may terminate it
at any time by destroying the software together with all copies,
manuals, disks, saved files, etc.. The license also terminates
if you fail to comply with the terms and conditions of the
license agreement.
Also, by terminating the license, you wave the right to reduced
upgrade fees, upgrade notices, etc.
Thanks for taking the time to read the legal information...File Listing
These files are included within the Text Windowing Interface
archive. The following are a semi complete list (any additions
will be in README.DOC).
File Name Description
----------- -------------
TWI.TPU Text Windowing Interface UNIT variation 1.
TWI2.TPU Text Windowing Interface UNIT variation 2.
TWIDEMO.PAS Demo program for TWI. (pull down menu demo)
TWIDEMO.EXE Compiled demo program for TWI.
TWIDEMO2.PAS Another demo program for TWI. (windowing
demo)
TWIDEMO2.EXE Compiled demo program for TWI.
MENUS.TPU Pull down menu unit for TWI.TPU (not TWI2).
AWBDUSER.EXE Another demo of TWI.
TWI.DOC DOS Text version of documentation.
TWI.WPF Word Perfect 5.1 version of documentation.
FILE_ID.DIZ Upload description for BBSs.
README.DOC Various notes that didn't make it into the
documentation.
HISTORY.DOC History, upgrade, and improvement
documentation file for TWI.
SHAREWRE.DOC DOS Text file describing Shareware.
ORDER.DOC Order form.
CATALOG.EXE A catalog of software from DSP Software.
VENDORS.DOC File filled with descriptions for vendors.
TWI_DESC.DOC Description file for posting in message
bases.
PRINTDOC.BAT Batch file that will print documentation on
printer.
Important Information
The documentation for TWI has been written in such a way that it
should be easy for a person with basic Turbo Pascal understanding
to use. If you need more help, please contact me at any of my
support boards or services (Further help section).
The Text Windowing Interface (TWI) is divided into three separate
parts. Each part is a unit and has its individual
characteristics. The three parts are: TWI.TPU, TWI2.TPU, and
MENUS.TPU.
TWI.TPU - Variation 1 of TWI
The First variation of the Text Windowing Interface has two major
differences from TWI2.TPU. The first being that if you want to
use pull down menus with TWI.TPU, you must put MENUS.TPU in the
USES clause at the beginning of your program. The second
difference is that all colors for the windows are passed through
the procedures themselves.
TWI2.TPU - Variation 2 of TWI
TWI2 includes MENUS.TPU; So if you want to use the menus just
call the procedures. Second, all colors are passed to the unit
globally. Meaning, all you have to do is type the color variable
+ := and the color you want; All the windows and menus will have
that color.
MENUS.TPU - Menuing toolkit for TWI.TPU
Since TWI.TPU doesn't include MENUS.TPU in it, you must place
MENUS.TPU in the USES clause at the beginning of your program.
Basically, if you are using TWI2.TPU then MENUS.TPU does not have
to be included in the USES clause. Otherwise you must include
both TWI and MENUS in the USES clause of your program.
Descriptions of every procedure and function are included within
this documentation; If there is any thing specific to either unit
it will be specifically pointed out.The Text Windowing Environment
The Text Windowing Interface Environment is very simple to
program, but very advanced and integrated! There are three major
parts that go into the interface: The Windows, The Colors, and
The BackGround. As well as, the optional pull down menuing
toolkit.
Important
If you use TWI2.TPU then you CANNOT use MENUS.TPU with it. You
cannot use TWI2.TPU and TWI.TPU at the same time. In TWI2.TPU
make sure you call DEFAULTCOLORS or carefully define all the
color variables before you begin intializing the environment.
Also, make sure you define every variable of text the will be
placed on the screen. If you don't you'll get lot's of garbage
on the screen.
Colors
You should initialize all the following variables if you do not
use the DEFAULT COLOR procedure: FGC, BGC, LC, FCCF, FCCB,
HFC(*), HBC(*), and WCOL. You also have to make Fillchar equal a
character for filling in the background.
Description of colors:
FCCF (Foreground Fill Character Color)
FCCB (Background Fill Character Color)
WCOL (Word Color)
FGC (Overall Foreground Color)
BGC (Overall Background Color)
LC (Line Color For Windows)
HFC (Highlight Foreground Color) *
HBC (Highlight Background Color) *
HC (Highlight color) *
* These colors are not initialized by DEFAULTCOLORS and are used
only by menuing functions.
Setting The Interface Up For The First Time
Your first program using TWI should be kept simple. If you like
to learning by immersion then dive into the demonstration code
that is included with TWI. If you don't, please carefully read
through this manual.
This is the first sample program. Let's call it HELLO.PAS:
Program Hello;
Uses TWI2;
Begin
QuickBKGDraw('This Is The Top Of The Screen','This isn't!');
DefaultColors;
DrawSmallWindow('This is HELLO.PAS','','','',25,8);
WaitForReturn;
TwiClose;
End.
This is about as simple as writing a program in the Text
Windowing Interface is! The output that will result is a box in
the middle of the screen, and nothing will happen until you press
return.
If you have problems when you are using TWI feel free to contact
me, and I'll try to help you out. If you're really having
trouble with your program, its always good to print it out, and
go through and map the code out in your mind. You should always
comment code in your programs by either using {...} or (*...*).
Commenting makes it easier for both me (if I have to help you
out), and you later on if you want to upgrade and improve upon
your program.
The demonstration programs that I have included is only a small
potential of what TWI can do. I've included AWBDUSER.EXE that
uses a small portion of TWI (It is from one of my other products,
Alley-Wall) for its interface. Also, I am developing a full
Shareware electronic messaging system that can be used on
networks and stand alone computers, and it uses TWI throughout.
The following pages contain a full description of each command.
All three units have things that are unique to themselves, and
these differences will be pointed out in the following pages.Overall Interface\Background Procedures
Procedure DRAWBACKGROUND - Draw Background
Variation 1 (TWI.TPU): DrawBackGround(Top,Bottom: String;
Fillchar: char; fccf, fccb, wcol:
integer);
Variation 2 (TWI2.TPU): DrawBackGround(Top,Bottom : String);
Example Usage
For TWI.TPU:
DRAWBACKGROUND('HELLO',BOTTOMLINE,'░',7,1,4);
For TWI2.TPU:
DRAWBACKGROUND(TOPLINE,'HELLO');
Description
Drawing the background is the heart of TWI. You should almost
always draw the background as one of the first initialization
steps in your program. Also, if the screen becomes cluttered
with garbage or messed up, just call up DRAWBACKGROUND and you
can redraw the screen.
DRAWBACKGROUND initializes the whole interface. First it paints
the background with the fill character (FILLCHAR : CHAR). The
FILLCHAR color is defined by FCCF and FCCB. The Fill-In
Character Color: Foreground (FCCF) and the Fill-In Character:
Background (FCCB) define the color of the FILLCHAR. FCCF and
FCCB are used any time you clear a window from the screen, or
when the background is effected by a change.
Second, it places the status lines on the top and bottom of the
screen. These status lines are referred as TOP,BOTTOM and the
color that they are display in is Word Color (WCOL).
Also Refer To: QUICKBKGDRAW, DEFAULTCOLORS, and Setting Colors
Up.
Procedure QUICKBKGDRAW - Quickly Draw Background
Twi var 1 and 2: QUICKBKGDRAW(TOP,BOTTOM : STRING);
Example Usage
QUICKBKGDRAW('THIS IS THE TOP OF THE SCREEN','THIS ISN''T');
Description
This procedure uses hard-coded color defaults to initialize the
interface. This procedure should be used if you want to do a
quick program with TWI. QUICKBKGDRAW benefits you, because you
do not have to initialize and define every color and option.
The color defaults for QUICKBKGDRAW and DEFAULTCOLORS are:
FCCF (Foreground Fill Character Color) Blue
FCCB (Background Fill Character Color) White
WCOL (Word Color) Red
FGC (Overall Foreground Color) Blue
BGC (Overall Background Color) White
LC (Line Color For Windows) Blue
...also thrown in the default background fill character
(FILLCHAR):
FILLCHAR (Background Fill-In Character) ░
In TWI2 all you have to do is type any one of the above variables
and the := plus the value you want to assign to it at any point
in your program. Even if you use QUICKBKGDRAW, you should call
DEFAULTCOLORS afterwards.
In TWI you can change the colors at any time by modifying the
variables in the window procedure. For instance,
DRAWSMALLWINDOW(A,B,C,D,FGC,BGC,LC,X,Y); You have to either
enter values into those variables, or place them in the VAR in
your program. Then go through and assign values for colors.
So, you can have DRAWSMALLWINDOW('Hello','','','',1,2,3,4,5); or
you can have it all variables (even a combination of variables
and just sticking the information into the procedure.)
Procedure CHANGESTATUSLINE; - Change status line without
redrawing background
TWI variation 1 (TWI.TPU) - CHANGESTATUSLINE(TOP,Bottom: String;
FCCF, FCCB, WCOL : Integer);
TWI variation 2 (TWI2.TPU)- CHANGESTATUSLINE(TOP,BOTTOM: STRING);
Example Usage
TWI variation 1:
CHANGESTATUSLINE('',BOTTOM,1,7,4);
TWI variation 2:
CHANGESTATUSLINE('ON TOP','ON BOTTOM');
Description
Changes the status line on the top and bottom of the screen to
whatever you want. Remember: If you are using the pull down
menus then make sure that you don't place anything on the top
line.
Refer: DRAWBACKGROUND, QUICKBKGDRAW, and CHANGEBOTTOMLINE.
------
Procedure CHANGEBOTTOMLINE; - Changes only the bottom status line
CHANGEBOTTOMLINE(BOTTOM: STRING; COLOR: INTEGER);
Example Usage
CHANGEBOTTOMLINE('F1 Help ESC Exit',4);
Description
This is very helpful to use instead of CHANGESTATUSLINE when you
are using pull down menus. There are two reason that you want to
use this procedure when you use pull down menus:
1) It won't affect the line with the menu bar
2) It makes it easy for you to change the status line
when the user moves the cursor from one menu option
to the next. (take a look at the TP6 pull down menus)
Basically, all it does is change the status line on the bottom of
the screen. Enter in a string, and then a color. To maintain
consistency throughout the interface, (if you are using variables
to contain the colors) you should use WCOL as the color.
Procedure TWICLOSE; - Shut TWI down, and end program
TWICLOSE;
Description
Shuts the Text Windowing Interface down. This procedure cleans
up the screen, stops program execution, and makes a quick check
to see if everything is okay.
Windowing Procedures
Procedure DRAWONELINEWINDOW; - Draws a window with a single space
of text
TWI variation 1 - DrawOneLineWindow(A: String; FGC, BGC, LC, X,
Y : Integer);
TWI variation 2 - DrawOneLineWindow(A: String; X, Y : Integer);
Example Of Usage
TWI.TPU: DRAWONELINEWINDOW(ALine,2,3,4,1,5);
TWI2.TPU: DRAWONELINEWINDOW(ALine,1,5);
Description
The name says it all. Draws a small (40 char) one line window.
Refer: DRAWFULLWINDOWOUTLINE
Procedure TWIFILELOAD; - Loads a file and displays it in a
window.
TWI.TPU: TWIFILELOAD(FileName, Title : String; FGC, BGC, LC :
Integer);
TWI2.TPU: TWIFILELOAD(FileName, Title : String);
Example Of Usage
TWI.TPU: TWIFILELOAD('HELP.HLP','TWI HELP',1,2,3);
TWI2.TPU: TWIFILELOAD('HELP.HLP','MORE HELP');
Description
TWIFILELOAD draws a box (40x10) and loads a file. This is very
helpful if you have want to have a help system, or you just want
to load a small file and view it.
The file can be up to 10 lines long, and 40 characters wide.
For the filename, you might want to make everything consistent.
For instance, if your program is BM.EXE then you might have
BM01.HLP, BM02.HLP, et cetera.
As for the title, put anything you want. There is a limited
space for the title as well.
FGC, BGC, and LC are still Foreground color, background color,
and line color.
Procedure DRAWSMALLWINDOW; - Draw a small and compact window
TWI Variation 1:
DRAWSMALLWINDOW(A,B,C,D : String; FGC, BGC, LC, X, Y : Integer);
TWI Variation 2:
DRAWSMALLWINDOW(A, B, C, D : STRING; X, Y : INTEGER);
Usage Example
TWI.TPU: DRAWSMALLWINDOW('Yo','Yo','Go','Go',FGC,BGC,LC,1,2);
TWI2.TPU: DRAWSMALLWINDOW('YO','YO','GO','GO',1,2);
Description
DRAWSMALLWINDOW draws a 4 line window at position you put in the
procedure (X,Y). The colors that are used by DRAWSMALLWINDOW are
FGC, BGC, and LC.
The length of each line in this small window is approximately 35
characters long, and 4 lines long.
Refer: CLEARSMALLWINDOW
----
Procedure CLEARSMALLWINDOW; - Removes a small window from the
screen
TWI Variation 1:
CLEARSMALLWINDOW(X, Y, FCCF, FCCB : INTEGER);
TWI Variation 2:
CLEARSMALLWINDOW(X,Y : INTEGER);
Example of Usage
TWI.TPU: CLEARSMALLWINDOW(1,2,7,1);
TWI2.TPU: CLEARSMALLWINDOW(1,2);
Description
CLEARSMALLWINDOW removes a small window that was drawn by
DRAWSMALLWINDOW by placing the FILLCHAR over each character of
the small window.
X and Y are the coordinates that the window was drawn at, or is
at. FCCF and FCCB are the colors that are used on the FILLCHAR.
Refer: DRAWSMALLWINDOW
Procedure DRAWMEDIUMWINDOW; - Draw a medium sized window
TWI Variation 1:
DRAWMEDIUMWINDOW(A,B,C,D,E,F : String; FGC, BGC, LC, X, Y :
Integer);
TWI Variation 2:
DRAWMEDIUMWINDOW(A, B, C, D, E, F : STRING; X, Y : INTEGER);
Usage Example
TWI.TPU:
DRAWMEDIUMWINDOW('Yo','Yo','Go','Go','','',FGC,BGC,LC,1,2);
TWI2.TPU:
DRAWMEDIUMWINDOW('YO','YO','GO','GO','','',1,2);
Description
DRAWMEDIUMWINDOW draws a 6 line window at the position you put in
the procedure (X,Y). The colors that are used by
DRAWMEDIUMWINDOW are FGC, BGC, and LC.
The length of each line in this small window is approximately 45
characters long, and 6 lines long.
Refer: CLEARMEDIUMWINDOW
----
Procedure CLEARMEDIUMWINDOW; - Removes a medium window from the
screen
TWI Variation 1:
CLEARMEDIUMWINDOW(X, Y, FCCF, FCCB : INTEGER);
TWI Variation 2:
CLEARMEDIUMWINDOW(X,Y : INTEGER);
Example of Usage
TWI.TPU: CLEARMEDIUMWINDOW(1,2,7,1);
TWI2.TPU: CLEARMEDIUMWINDOW(1,2);
Description
CLEARMEDIUMWINDOW removes a small window that was drawn by
DRAWMEDIUMWINDOW by placing the FILLCHAR over each character of
the small window.
X and Y are the coordinates that the window was drawn at, or is
at. FCCF and FCCB are the colors that are used on the FILLCHAR.
Procedure DRAWLARGEWINDOW; - Draw a large sized window
TWI Variation 1:
DRAWLARGEWINDOW(A,B,C,D,E,F,G,H,I,J : String; FGC, BGC, LC, X, Y
: Integer);
TWI Variation 2:
DRAWLARGEWINDOW(A, B, C, D, E, F, G, H, I, J : STRING; X, Y :
INTEGER);
Usage Example
TWI.TPU:
DRAWLARGEWINDOW('Yo','Yo','Go','Go','','','WOW',h,i,j,
FGC,BGC,LC,1,2);
TWI2.TPU:
DRAWLARGEWINDOW('YO','YO','GO','GO','','','','','','','',1,2);
Description
DRAWLARGEWINDOW draws a 10 line window at the position you put in
the procedure (X,Y). The colors that are used by DRAWLARGEWINDOW
are FGC, BGC, and LC.
The length of each line in this small window is approximately 45
characters long, and 6 lines long.
Refer: CLEARLARGEWINDOW
----
Procedure CLEARLARGEWINDOW; - Removes a medium window from the
screen
TWI Variation 1:
CLEARLARGEWINDOW(X, Y, FCCF, FCCB : INTEGER);
TWI Variation 2:
CLEARLARGEWINDOW(X,Y : INTEGER);
Example of Usage
TWI.TPU: CLEARLARGEWINDOW(1,2,7,1);
TWI2.TPU: CLEARLARGEWINDOW(1,2);
Description
CLEARLARGEWINDOW removes a small window that was drawn by
DRAWLARGEWINDOW by placing the FILLCHAR over each character of
the small window.
X and Y are the coordinates that the window was drawn at, or is
at. FCCF and FCCB are the colors that are used on the FILLCHAR.
Procedure DRAWVERYBIGWINDOW; - Draws a huge window
TWI Variation 1:
DRAWVERYBIGWINDOW(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O : String; FGC,
BGC, LC, X, Y : Integer);
TWI Variation 2:
DRAWVERYBIGWINDOW(A, B, C, D, E, F, G, H, I, J, K, L, M ,N, O :
STRING; X, Y : INTEGER);
Usage Example
TWI.TPU:
DRAWVERYBIGWINDOW('Yo','Yo','Go','Go','','','WOW',h,i,j,
FGC,BGC,LC,1,2);
TWI2.TPU:
DRAWVERYBIGWINDOW('YO','YO','GO','GO','','','','','','','','','',
'','','','',1,2);
Description
DRAWVERYBIGWINDOW draws a 15 line window that takes up 3/4ths of
the screen at the position you put in the procedure (X,Y). The
colors that are used by DRAWVERYBIGWINDOW are FGC, BGC, and LC.
The length of each line in this small window is approximately 45
characters long, and 6 lines long.
Refer: CLEARVERYBIGWINDOW
----
Procedure CLEARVERYBIGWINDOW; - Removes a very big window from
the screen
TWI Variation 1:
CLEARVERYBIGWINDOW(X, Y, FCCF, FCCB : INTEGER);
TWI Variation 2:
CLEARVERYBIGWINDOW(X,Y : INTEGER);
Example of Usage
TWI.TPU: CLEARVERYBIGWINDOW(1,2,7,1);
TWI2.TPU: CLEARVERYBIGWINDOW(1,2);
Description
CLEARVERYBIGWINDOW removes a small window that was drawn by
DRAWVERYBIGWINDOW by placing the FILLCHAR over each character of
the small window.
X and Y are the coordinates that the window was drawn at, or is
at. FCCF and FCCB are the colors that are used on the FILLCHAR.Procedure DRAWCOLORBOX; - Puts a window on screen with colors
TWI Variation 1:
DrawColorBox(X, Y, FGC, BGC, LC: Integer);
TWI Variation 2:
DrawColorBox(X, Y : Integer);
Example Of Usage
TWI.TPU: DrawColorBox(1,1,2,3,4);
TWI2.TPU: DrawColorBox(1,1);
Description
DRAWCOLORBOX places a window on the screen that contains every
possible combination of colors for IBM text, that ranges from 1-
15 in foreground and 1-7 for the background. You can use this
window to let users modify the interface colors, but you have to
write the actual color changing code and entry system.
----
Procedure DRAWFULLWINDOWOUTLINE; - Draws a box around the side of
the screen.
TWI Variation 1:
DRAWFULLWINDOWOUTLINE(FGC, BGC, LC : INTEGER);
TWI Variation 2:
DRAWFULLWINDOWOUTLINE;
Example Of Usage:
TWI.TPU: DRAWFULLWINDOWOUTLINE(1, 2, 3);
TWI2.TPU: DRAWFULLWINDOWOUTLINE;
Description
DRAWFULLWINDOWOUTLINE draws an outline of a box around the
screen. Anything you want to put on the screen has to be done
manually with WRITEXY, WRITEXYI, GOTOXY, WRITELN, and WRITE.
Pull-Down Menuing Procedures
The following procedures are built into TWI2.TPU. You cannot
place both TWI2 and MENUS in the USES statement of your program,
but you HAVE TO place both TWI and MENUS in the USES statement.
Basically, if you are using TWI2, there is no need to use MENUS,
since it is built into TWI2. On the other hand, since MENUS
isn't built in to TWI then you must (if you are going to use
menus) place MENUS and TWI in the USES statement.
Procedure DRAWMENUS; - Draw the menu bar on the top of the screen
DRAWMENUS;
Description
DRAWMENUS will draw the "menu bar" on the top of the screen. It
reads MENUA..MENUG which is a string of 10 characters. All you
have to do is before you call DRAWMENUS, type MENUA := 'Title';
for MENUA all the way to MENUG. These MENU titles for the menu
bars are passed to the toolkit, and you don't have to put
anything in the VAR statement.
----
Procedure MOVETOLOCAL; - Moves the highlighted part of the cursor
to one of the menu bar titles
MOVETOLOCAL(MoveToPlace : Integer);
Description
MOVETOLOCAL will highlight a menu bar title. For MoveToPlace
type an integer from 1 to 8. If you enter 1, it will make TWI
highlight MENUA, which is the first menu bar option.
Refer: CleanOldLocation
Procecedure CLEANOLDLOCATION; - De-Highlights a menu bar title
CLEANOLDLOCATION(OldLocation : Integer);
Description
CLEANOLDLOCATION will dehighlight a menu title that was
highlighted by MOVETOLOCAL. This is done by switching to the
original colors, and rewriting the menu title to the screen.
OLDLOCATION is the position you want to dehighlight. It can
range from 1 to 8.
Refer: MoveToLocal
----
Procedure DRAWSUBMENU; - Draws a sub menu
DRAWSUBMENU(var SubA, SubB, SubC, SubD, SubE, SubF, SubG, SubH :
String; X, Y, LGTH: Integer);
Example Of Usage
DRAWSUBMENU(SUBA,SUBB,SUBC,SUBD, SUBE, SUBF, SUBG, SUBH, 2, 2,
2);
Description
DRAWSUBMENU is a procedure that draws a sub menu that can have up
to 8 options.
Its length is determined by LGTH which is an integer. If you
only have one option in the sub menu then set LGth to 1, et
cetera.
X and Y determine its position on the screen. I have found that
it works best if you place it right below the menu bar. So that
would usually be that Y would be 2, and X would be a multiple of
10 up to 80. (10 div 80 equals 8, and there are 8 menu titles).
SUBA..SUBH must be variables or your program will not compile.
These variables tells TWI what to put in your submenu.
Refer: WHERECURSORISREWRITE, and OLDPLACEREWRITE
Procedure WHERECURSORISREWRITE - Highlights an option in the
submenu
WHERECURSORISREWRITE(PLACEX, PLACEY : INTEGER; OPTION : STRING);
Example Of Usage
WHERECURSORISREWRITE(3,3,SUBA);
Description
WHERECURSORISREWRITE will highlight an option in a submenu drawn
by using DRAWSUBMENU.
PLACEX and PLACEY are where the option you want to highlight is,
and OPTION is the actual string of the option. So if you draw
window at 1,1 on the screen, and want to highlight the first
option; Then use WHERECURSORISREWRITE(3,2,SUBA);.
Refer: DRAWSUBMENU and OLDPLACEREWRITE
----
Procedure OLDPLACEREWRITE - De-Highlights an option in the
submenu that was highlighted by
WHERECURSORISREWRITE
OLDPLACEREWRITE(PLACEX, PLACEY: INTEGER; OPTION: STRING);
Example Of Usage
OLDPLACEREWRITE(3,3,SUBA);
Description
OLDPLACEREWRITE will de-highlight an option highlighted by using
OLDPLACEREWRITE.
PLACEX and PLACEY tells the menu where the option you want to
turn back to normal is. OPTION is the actual string that the
option you are de-highlighted is.
Refer: WHERECURSORISREWRITEMiscellaneous Commands
Procedure WAITFORRETURN; - Wait for user to press return
WAITFORRETURN;
Description
WAITFORRETURN waits for the user to press return. Nothing is
placed on the screen by this procedure. So, you probably should
place something on the screen that tells the user that they have
to push return.
----
Procedure DEFAULTCOLORS; - Set colors to defaults
DEFAULTCOLORS;
NOTE: Only available in TWI2.TPU.
Description
DEFAULTCOLORS sets the colors of the interface to preset, hard-
coded defaults. These defaults can be changed at any time during
program execution by changing the color variable values. You do
not have to use this procedure when calling QUICKBKGDRAW, but you
must if you want to use any windows. (You can manually initialize
and assign values to the color variables)
Color defaults in DEFAULTCOLORS:
FCCF (Foreground Fill Character Color) Blue
FCCB (Background Fill Character Color) White
WCOL (Word Color) Red
FGC (Overall Foreground Color) Blue
BGC (Overall Background Color) White
LC (Line Color For Windows) Blue
...also thrown in the default background fill character
(FILLCHAR):
FILLCHAR (Background Fill-In Character) ░
Refer: QUICKBKGDRAW
Procedure WRITEXY; - Write to any point on the screen
WRITEXY(X,Y : INTEGER; TEXT : STRING);
Example Of Usage
WriteXY(5,5,'I am at point 5,5 on the screen!');
Description
WRITEXY is a simple screen writing procedure that I wrote for one
simple reason: save a couple of lines of space. Originally,
every time I wanted to place something at a particular point on
the screen, I would have to use GOTOXY and WRITE. Now I just
call WRITEXY.
Refer: WRITEXYI;
----
Procedure WRITEXYI; - Write an integer to a point on the screen
WRITEXYI(X, Y, TEXT : INTEGER);
Example Of Usage
WriteXYI(5,5,5);
Description
WRITEXYI does what WRITEXY does (write to a point on the screen),
but WRITEXYI writes integers instead of strings.
Refer: WRITEXY;
Further Help
If you need more help with TWI or anything else that is related
to the interface, please contact me by mail or electronic mail at
any time. I can be contacted on COMPUSERVE, please send mail in
the EMAIL (go mail) and post a message to 76547,2643. I can also
be contacted on INTERNET: 76547.2643@compuserv.com or
david.pabst@channel1.com. I can also be contacted on the
RelayNet message bases: SHAREWARE and TURBO PASCAL.
Also, you can directly call )(evious at (508)875-3618 (up to
14400bps), and leave a message in the EMAIL conference to me.
May home address is:
18 McAdams Road
Framingham, MA 01701
USA
Getting The Latest Version
The latest version may be found on Compuserve, )(evious (508-875-
3618), or your local bulletin board. If you can't find it in a
Shareware catalog or on a BBS you can mail away for a shareware
evaluation copy ($5).
Order Form
*** Use this form, the form in ORDER.DOC, or in CATALOG.EXE ***
NAME:____________________________________________________________
ADDRESS:________________________________________________APT:_____
CITY:____________________________________________ZIP:____________
COUNTRY__________________________________________________________
Voice phone (optional):__________________________________________
Data phone (if a BBS):___________________________________________
Version of TWI you are using? 1.1
Disk Format (Circle): 5.25" 3.5"
Do you have a high density disk drive:___________
The Text Windowing Interface is $15. Please send as a check or
money order made out to David Pabst. US FUNDS ONLY. If outside
of Canada or United States add $5 shipping and handling.
Your order will be processed as soon as it is received.
Send all orders to:
DSP Software
C\O David Pabst
18 McAdams Road
Framingham, MA 01701
U.S.A
Thank you for using and registering TWI.